import React, {useEffect} from 'react';
import {View, Text, TouchableOpacity, Switch} from 'react-native';
import {useNavigation} from '@react-navigation/native';
import AreaView from '../../components/Layout/AreaView';
import {List} from '@ant-design/react-native';
import {removeAll} from '../../utils/Authority';
import styles from './style';

const Item = List.Item;

const Set = () => {
  const navigation = useNavigation();

  return (
    <AreaView>
      <List>
        {/* <Item
          extra={<Text style={styles.list_text}>未绑定</Text>}
          arrow="horizontal">
          <Text style={styles.list_text}>微信绑定</Text>
        </Item>
        <Item
          extra={<Text style={styles.list_text}>未绑定</Text>}
          arrow="horizontal">
          <Text style={styles.list_text}>QQ绑定</Text>
        </Item>
        <Item
          extra={<Text style={styles.list_text}>未绑定</Text>}
          arrow="horizontal">
          <Text style={styles.list_text}>微博绑定</Text>
        </Item>
        <Item
          extra={<Text style={styles.list_text}>未绑定</Text>}
          arrow="horizontal">
          <Text style={styles.list_text}>支付宝绑定</Text>
        </Item> */}
        <Item arrow="horizontal" onPress={() => navigation.push('ResetPswd')}>
          <Text style={styles.list_text}>修改密码</Text>
        </Item>
        {/* <Item arrow="horizontal">
          <Text style={styles.list_text}>登录方式设置</Text>
        </Item> */}
        {/* <Item
          extra={
            <View style={styles.switch_container}>
              <Switch
                style={styles.switch}
                trackColor={{false: '#CCCCCC', true: '#EB0029'}}
                value={true}
              />
            </View>
          }>
          <Text style={styles.list_text}>通知公告提醒</Text>
        </Item>
        <Item
          extra={
            <View style={styles.switch_container}>
              <Switch
                style={styles.switch}
                trackColor={{false: '#CCCCCC', true: '#EB0029'}}
                value={true}
              />
            </View>
          }>
          <Text style={styles.list_text}>上课提醒</Text>
        </Item>
        <Item
          extra={
            <View style={styles.switch_container}>
              <Switch
                style={styles.switch}
                trackColor={{false: '#CCCCCC', true: '#EB0029'}}
                value={true}
              />
            </View>
          }>
          <Text style={styles.list_text}>订单提醒</Text>
        </Item> */}
        {/* <Item
          extra={
            <View style={styles.switch_container}>
              <Switch
                style={styles.switch}
                trackColor={{false: '#CCCCCC', true: '#EB0029'}}
                value={true}
              />
            </View>
          }>
          <Text style={styles.list_text}>WIFI下播放视频和直播</Text>
        </Item> */}
        {/* <Item arrow="horizontal">
          <Text style={styles.list_text}>清理与缓存</Text>
        </Item>
        <Item arrow="horizontal">
          <Text style={styles.list_text}>协议与隐私</Text>
        </Item>
        <Item extra={<Text style={styles.list_text}>V 1.0.0</Text>}>
          <Text style={styles.list_text}>检查更新</Text>
        </Item> */}
      </List>
      <View style={styles.edit_container}>
        <TouchableOpacity
          style={styles.edit_btn}
          onPress={() => {
            removeAll();
            navigation.replace('Login');
          }}>
          <Text style={styles.btn_text}>退出登录</Text>
        </TouchableOpacity>
      </View>
    </AreaView>
  );
};

export default Set;
